import React from 'react';
import { BrowserRouter,Switch,Router } from  'react-router-dom';

//组件方法
import PrivateRouter from '../privateRouter/index'
// 自动化导入组件
import components from './components'

function ContainerRouter(){
    return(
        <Switch>
           {
               components.map(item => {
                return <PrivateRouter key={item.path} exact path={item.path} component={item.component}></PrivateRouter>
               })
           }
        </Switch>
    )
}

export default ContainerRouter
